//
//  ActivityDetailView.m
//  LoveCar
//
//  Created by dlios on 15/5/25.
//  Copyright (c) 2015年 薛森鸿. All rights reserved.
//

#import "ActivityDetailView.h"
#import <Masonry/Masonry.h>

@interface ActivityDetailView ()
@property (retain, nonatomic) UIWebView *myWeb;

@end

@implementation ActivityDetailView

- (void)awakeFromNib
{
    [_url release];
    [_myWeb release];
    [super awakeFromNib];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"活动详情";
    
    self.myWeb = [[UIWebView alloc] init];
    [self.view addSubview:_myWeb];
    [self.myWeb loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
    [self.myWeb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view).with.insets(UIEdgeInsetsMake(10, 10, 10, 10));
    }];
    [_myWeb release];
    UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithTitle:@"  ╳" style:UIBarButtonItemStylePlain target:self action:@selector(backAction:)];
    back.tintColor = [UIColor lightGrayColor];
    self.navigationItem.leftBarButtonItem = back;
    [back release];
}
- (void)backAction:(id)sender
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (void)dealloc {
    [_myWeb release];
    [super dealloc];
}
@end
